
#定义一个函数求和
def sum(beg,end):
    sum1 = 0
    for i in range(beg,end+1):
        sum1 += i
    print(sum1)

sum(1,100)

sum(300,400)